package Cam1zyx0711;
import javax.swing.*;
import java.awt.*;

public class ImageBoard  extends JFrame {
    public void initUI() {
        //窗体的创建
        this.setTitle("美颜相机v0.1--by zyx");
        this.setSize(600, 600);
        this.getContentPane().setBackground(Color.WHITE);
        this.setDefaultCloseOperation(3);
        this.setLocationRelativeTo(null);
        this.setLayout(new FlowLayout());

        //按钮键->按钮功能(动作监听器)
        JButton buDraw=new JButton("图片呈现");
        this.add(buDraw);

        this.setVisible(true);

        Graphics g=this.getGraphics();

        //按钮功能(动作监听器)
        DrawMouse mouse = new DrawMouse(g);
        buDraw.addActionListener(mouse);




    }




    public static void main(String[] args) {
        ImageBoard lu=new ImageBoard();
        lu.initUI();
    }

}
